#pragma once
#include "stdafx.h"
#include <WinSock2.h>

namespace Network
{
	class INET_Addr
	{
		public:
			INET_Addr (string addr, u_short port);
			INET_Addr (u_long addr, u_short port);
			INET_Addr (string address, string port);

			u_short GetPort () const { return addr_.sin_port; }
			u_long GetIpAddress () const { return addr_.sin_addr.s_addr; }
			const sockaddr_in* Addr () const;
			size_t Size() const { return sizeof (addr_); }

		private:
			sockaddr_in addr_;
			string port_;
	};
}